GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( 57ab39...07143b )
by Fabien
01:38
created

jsonlint.js ➔ execJsonLint   A

Complexity

Conditions 4

Size

Total Lines 17
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 4
eloc 11
dl 0
loc 17
rs 9.85
c 0
b 0
f 0
1
/* eslint strict: ["error", "never"] */
2
3
const getJsonFiles = require('./lib/getJsonFiles');
4
const { execSync } = require('child_process');
5
6
// eslint-disable-next-line max-statements
7
const execJsonLint = function execJsonLint(jsonFiles) {
8
  let throwError = false;
9
  for (const file of jsonFiles) {
10
    try {
11
      console.info(`Lint the file ${file}`);
12
      // eslint-disable-next-line max-len
13
      execSync(`.\\node_modules\\.bin\\jsonlint ${file} --in-place`);
14
    } catch (error) {
15
      throwError = true;
16
    }
17
  }
18
  if (throwError) {
19
    const exitWithError = 1;
20
    // eslint-disable-next-line no-process-exit
21
    process.exit(exitWithError);
0 ignored issues
show
Compatibility Debugging Code Best Practice introduced by
Use of process.exit() is discouraged as it will potentially stop the complete node.js application. Consider quitting gracefully instead by throwing an Error.
Loading history...
22
  }
23
};
24
25
execJsonLint(getJsonFiles());
26